<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的方法扩展</title>
</head>
<body>

</body>


<script>
    //1.对象的比较
    const obj1={
        price:199
    }
    const obj2={
        price:199
    }
    console.log(Object.is(obj1,obj2));
    console.log(Object.is(NaN,NaN));
    console.log(NaN===NaN);


    //2.对象的合并
    const obj3={
        coler:'red'
    }
    console.log(Object.assign(obj2,obj3))


    //3.对象的原型设置
    console.log(Object.setPrototypeOf(obj1,obj2))


</script>
</html>